//
//  WBPerson.m
//  learnProject
//
//  Created by 吴斌 on 2022/9/9.
//

#import "WBPerson.h"


@implementation WBPerson

-(void)run
{
    NSLog(@"%s",__func__);
}

-(void)test
{
    NSLog(@"%s",__func__);
}

- (void)encodeWithCoder:(NSCoder *)coder
{
//    for{
//        [coder encodeInteger:self.age forKey:@"age"];
//        [coder encodeObject:self.name forKey:@"name"];
//    }
    
    [coder encodeInteger:self.age forKey:@"age"];
    [coder encodeObject:self.name forKey:@"name"];
}

- (instancetype)initWithCoder:(NSCoder *)coder
{
    self = [super init];
    if (self) {
        self.name = [coder decodeObjectForKey:@"age"];
    }
    return self;
}

@end
